package com.koron.device.bean.template;

import cn.hutool.core.collection.CollUtil;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ExportExcelMsg {

    private String name;

    private double width;

    private Integer sort;


    public ExportExcelMsg() {
    }

    public ExportExcelMsg(String name, double width, Integer sort) {
        this.name = name;
        this.width = width;
        this.sort = sort;
    }

    public List<ExportExcelMsg> initExport(){
        List<ExportExcelMsg> initlist =new ArrayList();
        initlist.add(new ExportExcelMsg("顶层节点",20.0,0));
        initlist.add(new ExportExcelMsg("设备id",20.0,1));
        initlist.add(new ExportExcelMsg("设备编号",20.0,2));
        initlist.add(new ExportExcelMsg("设备名称",20.0,3));
        initlist.add(new ExportExcelMsg("设备分类编码",20.0,4));
        initlist.add(new ExportExcelMsg("设备分类名称",35.0,5));
        initlist.add(new ExportExcelMsg("设备路径",100.0,6));
        return initlist;
    }

    public static List<String> getInitExport(){
        ArrayList<String> strings = CollUtil.newArrayList("顶层节点", "设备id", "设备编号", "设备名称", "设备分类编码", "设备分类名称", "设备路径");
        return strings;
    }

    public static List<DynamicColumnVo> getInitColum(){
        List<DynamicColumnVo> list =new ArrayList();
        for (String paramName : getInitExport()) {
            list.add(new DynamicColumnVo(paramName, paramName));
        }
        return list;
    }



}
